﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared.Master" AutoEventWireup="true"
    CodeBehind="Products.aspx.cs" Inherits="ESHOP.ADMIN.WebForm5" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">
    <form id="product" runat="server">
    <div style="padding: 10px;">
        <h3>
            Search&nbsp; Product</h3>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="listProduct">
            <asp:UpdatePanel ID="updateinfor" UpdateMode="Conditional" runat="server">
                <ContentTemplate>
                    <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                        <tr>
                            <td style="text-align: right; padding-right: 5px;">
                                &nbsp;<th valign="top" colspan="2">
                                    <asp:Label ID="lbThongBao" runat="server" Text="Label"></asp:Label>
                                </th>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right; padding-right: 5px;">
                                <th valign="top">
                                    Tên sản phẩm:
                                </th>
                            </td>
                            <td style="width: 391px">
                                <asp:TextBox ID="txttensp" runat="server" CssClass="inp-form"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right; padding-right: 5px;">
                                <th valign="top">
                                    Loại sản phẩm :
                                </th>
                            </td>
                            <td style="width: 391px">
                                <asp:DropDownList ID="ddlloaisanpham" runat="server" CssClass="inp-form-select" Height="29px"
                                    Width="197px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right; padding-right: 5px;">
                                <th valign="top">
                                    công ty :
                                </th>
                            </td>
                            <td style="width: 391px">
                                <asp:DropDownList ID="ddlCompanies" runat="server" CssClass="inp-form-select" Height="29px"
                                    Width="197px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right; padding-right: 5px;">
                                <th valign="top">
                                    xuất xứ :
                                </th>
                            </td>
                            <td style="width: 391px">
                                <asp:DropDownList ID="ddlxuatxu" runat="server" CssClass="inp-form-select" Height="29px"
                                    Width="197px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right; padding-right: 5px;">
                                <th valign="top">
                                    giá:
                                </th>
                            </td>
                            <td style="width: 391px">
                                <asp:TextBox ID="txtgia" runat="server" CssClass="inp-form"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right; padding-right: 5px;">
                                <th valign="top">
                                    Hiện thị:
                                </th>
                            </td>
                            <td style="width: 391px">
                                <asp:CheckBox ID="cbshow" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td style="padding-left: 60px; padding-top: 10px">
                                <asp:Button ID="btnsave" runat="server" Text="Save" Height="29px" Width="61px" OnClick="btnsave_Click" />
                            </td>
                            <td style="padding-left: 10px; padding-top: 10px">
                                <asp:Button ID="btnfilter" runat="server" Text="Search" Height="29px" Width="61px"
                                    OnClick="btnfilter_Click" />
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <h3>
            List Products</h3>
        <asp:UpdatePanel ID="updategrid" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <div class="listProduct">
                    <asp:GridView ID="GVProducts" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84"
                        BorderStyle="None" BorderWidth="1px" CellPadding="0" CellSpacing="0" EnableModelValidation="True"
                        AutoGenerateColumns="False" Height="178px" Width="100%" OnRowCommand="GVProducts_RowCommand"
                       
                        AllowPaging="true" PageSize="10" 
                        onpageindexchanging="GVProducts_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField HeaderStyle-CssClass="checkbox" HeaderText="STT" HeaderStyle-Width="7%">
                                <ItemTemplate>
                                    <%# Container.DataItemIndex + 1%>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderStyle-Width="15%" HeaderText="Mã Sản Phẩm&nbsp;">
                                <ItemTemplate>
                                    <%# Eval("ID") %>
                                </ItemTemplate>
                                <ItemStyle Font-Bold="true" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderStyle-Width="25%" HeaderText="Tên Sản Phẩm">
                                <ItemTemplate>
                                    <%# Eval("TENSANPHAM")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderStyle-Width="10%" HeaderText="Giá">
                                <ItemTemplate>
                                    <%# Eval("GIA")%>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderStyle-Width="15%" HeaderText="Loại Sản Phẩm ">
                                <ItemTemplate>
                                    <%# Eval("DANHMUC.TENDM")%>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderStyle-Width="6%" HeaderText="">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkBtndelete" runat="server" CommandArgument='<%# Eval("ID") %>'
                                        CommandName='<%# Eval("TINHTRANG").ToString()=="LA"?"DeActive":"Active" %>' Text='<%# Eval("TINHTRANG").ToString()=="LA"?"DeActive":"Active" %>'></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Font-Bold="true" HorizontalAlign="Center" />
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                    </asp:GridView>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</asp:Content>
